<%-- 
    Document   : SanPhamBanChaySubpage
    Created on : May 22, 2011, 8:43:09 AM
    Author     : ToanNhan
--%>

<%@page import="Pojos.SanPham"%>
<%@page import="java.util.List"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="js/XemDanhSachSanPham.js"></script>
<script src="js/jquery.tooltip.js" type="text/javascript"></script>
<%request.setCharacterEncoding("UTF-8");%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<div style="width:100%px; text-align: center; border: 1px solid blue; margin-top: 10px;">
    <div style="width: 100%; background-color: bisque"><font color="blue"><strong>Sản Phẩm Bán Chạy</strong></font></div>
    <div style="width: 100%; text-align: center;">
        <center>
            <%
                        List<SanPham> dsSanPham = (List<SanPham>) request.getAttribute("dsSanPhamBanChay");
                        int count = 0;
                        SanPham sp = null;
                        int size = dsSanPham.size();
            %>
            <table border="1px">
                <%while (count < size) {%>
                <tr>
                    <%for (int i = 0; i < 3; i++) {
                            if (count < size) {
                                sp = dsSanPham.get(count);
                                count++;
                    %>
                    <td align="center" width="300px" valign="10px">
                        <a href="XemChiTietSanPham.jsp?maSanPham=<%=sp.getMaSanPham()%>"><img width="100px" height="100px" src="/WebsiteBanHang<%=sp.getHinhSanPham()%>" alt="<%=sp.getMaSanPham()%>"/></a> <br/>
                        <%=sp.getTenSanPham()%><br />
                        <font color="RED"><%=sp.getGiaBan()%> VNĐ</font>

                    </td>
                    <%}
                    }%>
                </tr>
                <%}%>
            </table>
        </center>
    </div>
</div>
